﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:wpf="clr-namespace:ViewOnCore.Helper.WPF;assembly=ViewOnCore"
    xmlns:control="clr-namespace:UI.Control"
    xmlns:globalProperties="clr-namespace:ViewOnCore.Properties;assembly=ViewOnCore"
    xmlns:properties="clr-namespace:MusicPlayerAddIn.Properties"
    x:Class="UI.Control.KioskAlbumDialog"
    Height="450"
    Width="550"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <control:ChildWindowDecoratorKiosk x:Name="childWindowDecorator">

        <Border BorderThickness="0" BorderBrush="#F0444444" CornerRadius="4" Margin="10,10,10,10">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition/>
                    <RowDefinition Height="40"/>
                </Grid.RowDefinitions>
                
                <StackPanel Orientation="Horizontal" Grid.Row="1">
                    
                    <StackPanel Margin="10,25,20,20">
                        <Border HorizontalAlignment="Center"  VerticalAlignment="Center">
                            <Image MaxWidth="100" MaxHeight="150" x:Name="imgCover"></Image>
                            <Border.BitmapEffect>
                                <BitmapEffectGroup>
                                    <DropShadowBitmapEffect Color="Black" Direction="200" ShadowDepth="10" Softness="1" Opacity="0.5"/>
                                </BitmapEffectGroup>
                            </Border.BitmapEffect>
                            <Border.RenderTransform>
                                <SkewTransform CenterX="0.5" CenterY="0.5" AngleX="0" AngleY="-5" />
                            </Border.RenderTransform>
                        </Border>
                        <Border x:Name="borReflection" Width="{Binding ActualWidth, ElementName=imgCover}" Height="{Binding ActualHeight, ElementName=imgCover}">
                            <Border.Background>
                                <VisualBrush Visual="{Binding ElementName=imgCover}">
                                    <VisualBrush.Transform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="-1"/>
                                            <TranslateTransform Y="{Binding ActualHeight, ElementName=imgCover}"/>
                                        </TransformGroup>
                                    </VisualBrush.Transform>
                                </VisualBrush>
                            </Border.Background>
                            <Border.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Offset="0" Color="#66000000"></GradientStop>
                                    <GradientStop Offset="0.6" Color="Transparent"></GradientStop>
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                            <Border.RenderTransform>
                                <SkewTransform CenterX="0.5" CenterY="0.5" AngleX="5" AngleY="-5" />
                            </Border.RenderTransform>
                        </Border>
                    </StackPanel>

                    <Grid HorizontalAlignment="Stretch" Margin="10,0,5,10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="30" />
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        
                        <Border Grid.Row="0" Grid.RowSpan="2" CornerRadius="2" Background="{DynamicResource VOColor12}"/>
                        
                        <TextBlock x:Name="txtTitle1" Grid.Row="0" FontSize="16" FontWeight="Bold" Margin="10,5,0,5"/>
                        <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="10,0,0,10">
                            <TextBlock x:Name="txtTitle2" FontSize="14"/>
                            <StackPanel Orientation="Horizontal" Margin="5,0,0,0">
			                    <ToggleButton x:Name="tbtRating1" IsEnabled="False" Width="16" Height="20" Style="{StaticResource ToggleButton.Star}"/>
			                    <ToggleButton x:Name="tbtRating2" IsEnabled="False" Width="14" Height="20" Style="{StaticResource ToggleButton.Star}"/>
                    			<ToggleButton x:Name="tbtRating3" IsEnabled="False" Width="14" Height="20" Style="{StaticResource ToggleButton.Star}"/>
			                    <ToggleButton x:Name="tbtRating4" IsEnabled="False" Width="14" Height="20" Style="{StaticResource ToggleButton.Star}"/>
			                    <ToggleButton x:Name="tbtRating5" IsEnabled="False" Width="14" Height="20" Style="{StaticResource ToggleButton.Star}"/>
		                    </StackPanel>
                        </StackPanel>
                        
                        <ListBox x:Name="lstAlbums" Grid.Row="2" Margin="10,0,0,0" HorizontalAlignment="Stretch">
                            <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border BorderThickness="1" BorderBrush="{DynamicResource VOColor14}" CornerRadius="3" MinWidth="250" MaxWidth="300">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{Binding BitmapImage}" Width="50" Height="50"/>
                                        <StackPanel Orientation="Vertical">
                                            <Label Content="{Binding Title}" Margin="10,0,0,0" VerticalAlignment="Top"/>
                                            <Label Content="{Binding Artist}" Margin="10,0,0,0" VerticalAlignment="Top"/>
                                        </StackPanel>
                                        <Button x:Name="btnPlay" Style="{DynamicResource Button.TransparentWithEffect}" Margin="4,2,0,0" Height="22" Click="btnPlay_Click" HorizontalAlignment="Left" VerticalAlignment="Top">
                                            <StackPanel Orientation="Horizontal" Margin="2">
                                                <Path
                                                  x:Name="patPlay"
                                                  HorizontalAlignment="Left"
                                                  Width="10"
                                                  Height="17"
                                                  Data="M0,100 L0,0 60,50 z"
                                                  Stretch="Fill"
                                                  Fill="{DynamicResource VOColor02}"
                                                  Stroke="{DynamicResource VOColor15}"/>
                                                <TextBlock Text="{x:Static properties:Globalization.Play}" Margin="5,0,0,0" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </Button>
                                    </StackPanel>
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                        </ListBox>
                </Grid>
                    
                </StackPanel>

                <Button Style="{StaticResource Button.TransparentWithEffect}" Grid.Row="2" Width="80" HorizontalAlignment="Center" VerticalAlignment="Bottom" Click="btnExit_Click" Height="34" x:Name="btnExit">
                    <TextBlock Text="{x:Static globalProperties:Globalization.Exit}" Foreground="{DynamicResource VOColor1A}" Margin="5,5,5,5"/>
                </Button>
                
            </Grid>
        </Border>

    </control:ChildWindowDecoratorKiosk>
</UserControl>
